package com.lovo.emp.service.impl;

import com.lovo.common.model.CutPageBean;
import com.lovo.common.model.EmpBean;
import com.lovo.emp.dao.IEmpDao;
import com.lovo.emp.dao.impl.EmpDaoImpl;
import com.lovo.emp.service.IEmpService;
/**
 * 员工管理Service实现类
 * @author 白德柯
 *
 */
public class EmpServiceImpl implements IEmpService {
    private IEmpDao empDao = new EmpDaoImpl();
    @Override
    public CutPageBean<EmpBean> findByItem(int page, EmpBean empBean) {
        return empDao.findByItem(page,empBean);
    }

    @Override
    public EmpBean findById(int id) {
        return empDao.findById(id);
    }

    @Override
    public int add(EmpBean empBean) {
        return empDao.add(empBean);
    }

    @Override
    public int delete(int id) {
        return empDao.delete(id);
    }

    @Override
    public int update(EmpBean empBean) {
        return empDao.update(empBean);
    }

    @Override
    public EmpBean login(EmpBean empBean) {
        return empDao.findByLoginNameAndPwd(empBean);
    }
}
